Phase detection is used in Delay-Locked Loop (DLL) and Phase-Locked Loop (PLL) circuits. A DLL circuit compares a phase of one of the outputs of the DLL circuit to an input clock, in order to generate an error signal, which is then integrated and fed back as the control to the delay elements. A PLL circuit compares the phase of an oscillator with an incoming signal, in order to generate an error signal, which is then integrated to create a control signal for the oscillator.